﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ManagerViews/Manager.Master" AutoEventWireup="true" CodeBehind="UserInfo.aspx.cs" Inherits="BestBuy.ManagerViews.UserInfo" %>
<%@ Register TagPrefix="uc" TagName="MessagePanel" Src="~/UserControls/MessagePanel.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="wrapper-content">
        
        <div class="form-horizontal">
            <fieldset>
                <legend>User information</legend>
                <uc:MessagePanel ID="UserInfoMessage" runat="server" />
                <asp:ValidationSummary ID="UpdateUserInfoValidationSummary" runat="server" CssClass="alert alert-danger"
                    ValidationGroup="UpdateUserInfoValidationGroup" />
                <div class="control-group">
                    <asp:Label ID="FirstNameLabel" runat="server" AssociatedControlID="FirstName" CssClass="control-label">FirstName:</asp:Label>
                    <div class="controls">
                        <asp:TextBox ID="FirstName" runat="server" MaxLength="50" />
                        <asp:RequiredFieldValidator ID="FirstNameRequired" runat="server" ControlToValidate="FirstName"
                            CssClass="failureNotification" ErrorMessage="FirstName." ToolTip="FirstName." ValidationGroup="UpdateUserInfoValidationGroup">*</asp:RequiredFieldValidator>
                    </div>
                </div>
                <div class="control-group">
                    <asp:Label ID="LastNameLabel" runat="server" AssociatedControlID="LastName" CssClass="control-label">LastName:</asp:Label>
                    <div class="controls">
                        <asp:TextBox ID="LastName" runat="server" MaxLength="50" />
                        <asp:RequiredFieldValidator ID="LastNameRequired" runat="server" ControlToValidate="LastName"
                            CssClass="failureNotification" ErrorMessage="LastName." ToolTip="LastName." ValidationGroup="UpdateUserInfoValidationGroup">*</asp:RequiredFieldValidator>
                    </div>
                </div>
                <div class="control-group">
                    <asp:Label ID="EmailLabel" runat="server" CssClass="control-label">E-mail:</asp:Label>
                    <div class="controls">
                        <span id="Email" runat="server" class="uneditable-input" />
                    </div>
                </div>
                <div class="control-group">
                    <asp:Label ID="PhoneNumberLabel" runat="server" AssociatedControlID="PhoneNumber"
                        CssClass="control-label">PhoneNumber:</asp:Label>
                    <div class="controls">
                        <asp:TextBox ID="PhoneNumber" runat="server" MaxLength="20" />
                        <asp:RequiredFieldValidator ID="PhoneNumberRequired" runat="server" ControlToValidate="PhoneNumber"
                            CssClass="failureNotification" ErrorMessage="PhoneNumber." ToolTip="PhoneNumber."
                            ValidationGroup="UpdateUserInfoValidationGroup">*</asp:RequiredFieldValidator>
                    </div>
                </div>
                <div class="control-group">
                    <div class="controls">
                        <asp:Button ID="UpdateUserInfoButton" runat="server" CssClass="btn btn-primary" Text="Save"
                            ValidationGroup="UpdateUserInfoValidationGroup" OnClick="UpdateUserInfoButton_Click" OnClientClick="hideMessagePanel()" />
                    </div>
                </div>
                </span>
            </fieldset>
            <fieldset>
                <legend>Change password</legend>
                <uc:MessagePanel ID="ChangePassMessage" runat="server" />
                <asp:ValidationSummary ID="ChangePassValidationSummary" runat="server" CssClass="alert alert-danger"
                    ValidationGroup="ChangePassValidationGroup" />
                <div class="control-group">
                    <asp:Label ID="OldPassLabel" runat="server" AssociatedControlID="OldPass" CssClass="control-label">Current password:</asp:Label>
                    <div class="controls">
                        <asp:TextBox ID="OldPass" runat="server" CssClass="textEntry" TextMode="Password"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="OldPass"
                            CssClass="failureNotification" ErrorMessage="Current password." ToolTip="Current password."
                            ValidationGroup="ChangePassValidationGroup" Display="Dynamic">*</asp:RequiredFieldValidator>
                        <asp:CustomValidator ID="OldPassMatchValidator" runat="server" CssClass="failureNotification"
                            ErrorMessage="Current password is incorrect." ToolTip="Current password is incorrect."
                            ValidationGroup="ChangePassValidationGroup" OnServerValidate="OldPassMatchValidator_ServerValidate">*</asp:CustomValidator>
                    </div>
                </div>
                <div class="control-group">
                    <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" CssClass="control-label">New Password:</asp:Label>
                    <div class="controls">
                        <asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password"
                            CssClass="failureNotification" ErrorMessage="New Password." ToolTip="New Password."
                            ValidationGroup="ChangePassValidationGroup">*</asp:RequiredFieldValidator></div>
                </div>
                <div class="control-group">
                    <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword"
                        CssClass="control-label">Confirm Password:</asp:Label>
                    <div class="controls">
                        <asp:TextBox ID="ConfirmPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                        <asp:RequiredFieldValidator ControlToValidate="ConfirmPassword" CssClass="failureNotification"
                            Display="Dynamic" ErrorMessage="New Password." ID="ConfirmPasswordRequired"
                            runat="server" ToolTip="New Password." ValidationGroup="ChangePassValidationGroup">*</asp:RequiredFieldValidator>
                        <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password"
                            ControlToValidate="ConfirmPassword" CssClass="failureNotification" Display="Dynamic"
                            ErrorMessage="Password is incorrect." ValidationGroup="ChangePassValidationGroup">*</asp:CompareValidator></div>
                </div>
                <div class="control-group">
                    <div class="controls">
                        <asp:Button ID="ChangePassButton" runat="server" CssClass="btn btn-primary" Text="Save"
                            ValidationGroup="ChangePassValidationGroup" OnClick="ChangePassButton_Click" OnClientClick="hideMessagePanel()" />
                    </div>
                </div>
            </fieldset>
        </div>
    </div>

</asp:Content>
